<template>
	<view class="goodsCard">
		<image class="goodsImg" src="https://img0.baidu.com/it/u=3087290777,354138148&fm=26&fmt=auto&gp=0.jpg" mode="aspectFill"></image>
		<view class="goodsName">
			<text class="text">的积分更换等级黄金时代反间谍法地方金黄色等级分回到家</text>
		</view>
		<view class="salesInfo">
			<view class="left">
				<view class="tags">
					<text class="name">会员折扣</text>
				</view>
				<view class="tags">
					<text class="name">直降200</text>
				</view>
			</view>
			<view class="right">
				<text class="salesCount">已售2000</text>
			</view>
		</view>
		<view class="footer">
			<view class="left">
				<text class="price">￥</text>
				<text class="num">1999</text>
				<text class="price"></text>
			</view>
			<view>
				<view class="buyBtn">
					<text class="btnText">购买</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		name: 'goodsCard',
		props:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.goodsCard{
		width: 340rpx;
		padding-bottom: 10rpx;
		border-radius: 10rpx;
		background: #fff;
		.goodsImg{
			width: 340rpx;
			height: 280rpx;
			border-radius: 10rpx 10rpx 0 0;
		}
		.goodsName{
			width: 340rpx;
			padding: 16rpx 20rpx;
			/* #ifndef APP-PLUS */
			box-sizing: border-box;
			/* #endif */
			.text{
				font-size: 28rpx;
				color: #181818;
				overflow: hidden;
				text-overflow: ellipsis;
				/* #ifndef APP-PLUS */
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				/* #endif */
				lines: 2
			}
		}
		.salesInfo{
			width: 340rpx;
			padding: 0rpx 16rpx;
			/* #ifndef APP-PLUS */
			box-sizing: border-box;
			/* #endif */
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			flex-wrap: wrap;
			.left{
				display: flex;
				flex-direction: row;
				justify-content: flex-start;
				align-items: center;
				.tags{
					width: 94rpx;
					border: 1px solid #FF0000;
					height: 34rpx;
					margin-right: 10rpx;
					/* #ifndef APP-PLUS */
					box-sizing: border-box;
					/* #endif */
					border-radius: 4rpx;
					.name{
						font-size: 20rpx;
						color: #FF0000;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						text-align: center;
						
						overflow: hidden;
						text-overflow: ellipsis;
						/* #ifndef APP-PLUS */
						white-space: nowrap;
						/* #endif */
						lines: 1
					}
				}
			}
			.right{
				.salesCount{
					font-size: 22rpx;
					color: #9d9d9d;
				}
			}
		}
		.footer{
			width: 340rpx;
			display: flex;
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			padding: 16rpx;
			/* #ifndef APP-PLUS */
			box-sizing: border-box;
			/* #endif */
			.left{
				display: flex;
				flex-direction: row;
				justify-content: flex-start;
				align-items: center;
				.price, .num{
					font-size: 26rpx;
					color: #FB3E3B;
					font-weight: bold;
				}
				.num{
					font-size: 40rpx;
				}
			}
			.buyBtn{
			  width: 120rpx;
				height: 52rpx;
				padding: 0;
				border-radius: 26rpx;
				background-color: #FB3E3B;
				.btnText{
					color: #fff;
					font-size: 26rpx;
					text-align: center;
					line-height: 50rpx;
				}
			}
		}
	}
</style>
